import request from '@/utils/request'

// 获取咨询分类列表
export const getConsultApi = (params) => {
    return request({
        url: '/content/cate',
        method: 'get',
        params
    })
}

// 咨询分类新增
export const getContentCateApi = (data) => {
    return request({
        url: 'content/cate',
        method: 'post',
        data
    })
}

// 咨询分类 / 数据回显
export const getContentCateListApi = (id) => {
    return request({
        url: 'content/cate/' + id,
        method: 'get',
    })
}
// 编辑
export const getEditContentCateListApi = (data) => {
    return request({
        url: 'content/cate/' + data.id,
        method: 'put',
        data
    })
}
// 删除
export const getdelContentCateListApi = (id) => {
    return request({
        url: 'content/cate/' + id,
        method: 'DELETE',
    })
}

// =======================================================

// 编辑管理新增
export const getContentArticleApi = (data) => {
    return request({
        url: 'content/article',
        method: 'post',
        data
    })
}

// 获取编辑管理列表
export const getArticleApi = (params) => {
    return request({
        url: 'content/article',
        method: 'get',
        params
    })
}
// 获取编辑管理列表 / 数据回显
export const getArticleListApi = (id) => {
    return request({
        url: 'content/article/' + id,
        method: 'get'
    })
}
// 编辑
export const getEditListApi = (data) => {
    return request({
        url: 'content/article/' + data.id,
        method: 'put',
        data
    })
}
// 删除
export const getDelListApi = (id) => {
    return request({
        url: 'content/article/' + id,
        method: 'DELETE',
    })
}